package com.ebupt.migu.fineoperationactivitymonitor;

import org.springframework.boot.Banner;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableAsync;

import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
import com.baomidou.mybatisplus.extension.MybatisMapWrapperFactory;

@EnableAsync
@EnableCaching
@SpringBootApplication
public class FineOperationActivityMonitorApplication {

    public static void main(String[] args) {
        new SpringApplicationBuilder(FineOperationActivityMonitorApplication.class).web(WebApplicationType.NONE)
            .bannerMode(Banner.Mode.OFF).run(args);
    }

    /**
     * mp 3.2.0以上版本， map驼峰转换
     */
    @Bean
    public ConfigurationCustomizer configurationCustomizer() {
        return i -> i.setObjectWrapperFactory(new MybatisMapWrapperFactory());
    }
}
